<%-------------------------------------------------------------------
 * 页面名称：resetIVRPassByEmail.jsp
 * 功能描述：重置电话账户密码通过email
 * Action: 
 *
 *-------------------------------------------------------------------
--%>
<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ page import="cn.agiledata.bank.common.util.WeatherUtil"%>
<%@ page import="cn.agiledata.bank.account.service.IAccountConst"%>
<%@ taglib uri="/WEB-INF/conf/tld/struts-html.tld" prefix="html"%>
<%@ taglib prefix="ad" uri="agiledata"%>
<%
	String path = request.getContextPath();
	String email = WeatherUtil.getLoingInfoFromSession(request)
			.getAccount().getEmail();
	if (email == null) {
		email = "";
	}

	String modifyType = (String) request.getParameter("modifyType");
	if (modifyType == null) {
		modifyType = (String) request.getAttribute("modifyType");
		if (modifyType == null) {
			modifyType = IAccountConst.MODIFY_TYPE_LOGIN;
		}
	}
	String passwordType = "登录";
	if (modifyType.equals(IAccountConst.MODIFY_TYPE_PAY)) {
		passwordType = "支付";
	}
%>
<script type='text/javascript'
	src='<%=path%>/js/vnv/passwordStrength.js'></script>
<SCRIPT LANGUAGE="JavaScript">
function submitProcess() {
	var formObj = document.forms["0"];
	if (checkNecessaryInput(formObj)) {
		if (getObj("newPass").value.length < 6 || getObj("newPass").value.length > 15) {
			alert("密码长度必须为6-15位！");
			return false;
		}
		if (isNaN(getObj("newPass").value)) {
			alert("密码只能为数字！");
			getObj("newPass").value="";
			getObj("reNewPass").value="";
			return false;
		}
		if (getObj("newPass").value != getObj("reNewPass").value) {
			alert("两次输入的新密码要一致！");
			return false;
		} 
		
		formObj.submit();
	}
}

</SCRIPT>
<div id="mainFrame">
	<div class="rightSider">
		<div class="sub_title">
			<span class="bluefont18bdrop">重置电话账户<%=passwordType%>密码</span>
		</div>
		<div class="edit_pass">
			<table width="100%" border="0" align="center" cellpadding="5"
				cellspacing="1">
				<html:form action="/resetIVRPassword.do">
					<input type="hidden" name="modifyType" value="<%=modifyType%>" />
					<tr>
						<td height="25" align="right">
							<span class="orang12b">*</span>Email地址：
						</td>
						<td bgcolor="#FFFFFF">
							<html:text property="email" alt="Email地址" maxlength="64"
								size="40" styleClass="inputStyle" value="<%=email%>"
								readonly="true" />
						</td>
						<td bgcolor="#FFFFFF">
						</td>
					</tr>
					<tr>
						<td height="25" align="right">
							<span class="orang12b">*</span>确 认 码：
						</td>
						<td bgcolor="#FFFFFF">
							<html:text property="resetCode" alt="确 认 码" maxlength="64"
								size="40" styleClass="inputStyle" />
						</td>
						<td bgcolor="#FFFFFF">
						</td>
					</tr>
					<tr>
						<td height="25" align="right">
							<span class="orang12b">*</span>新 密 码：
						</td>
						<td bgcolor="#FFFFFF">
							<input type="password" name="newPass" alt="新 密 码" maxlength="20"
								size="40" class="inputStyle"
								onkeyup="newPassword.update(this.value)" />
							&nbsp;&nbsp;(6-20个字符)
						</td>
						<td bgcolor="#FFFFFF">
							<ad:passwordStrength objectName="newPassword" />
						</td>
					</tr>
					<tr>
						<td height="25" align="right">
							<span class="orang12b">*</span>重复新密码：
						</td>
						<td bgcolor="#FFFFFF">
							<input type="password" name="reNewPass" alt="重复新密码"
								maxlength="20" size="40" class="inputStyle"
								onkeyup="confirmPassword.update(this.value)" />
							&nbsp;&nbsp;(6-20个字符)
						</td>
						<td bgcolor="#FFFFFF">
							<ad:passwordStrength objectName="confirmPassword" />
						</td>
					</tr>
					<tr>
						<td height="55">
							&nbsp;
						</td>
						<td height="25">
							<input name="button" type="button" class="button_style"
								onclick="submitProcess();" value="确 定" />

							<input name="button" type="button" class="button_style"
								onclick="location.href='forgotIVRPassword.do?modifyType=<%=modifyType%>';"
								value="返 回" />
						</td>
					</tr>
					<tr>
						<td height="41" align="right" colspan="3">
							<input type="button" name="return" value="返回账户信息"
								class="button_style"
								onclick="loading('<%=path%>/route.do?modual=space$account&showTab=3');"
								style="margin-right:20px;" />
						</td>
					</tr>
				</html:form>
			</table>
			<div class="button_Frame"></div>
		</div>
	</div>
</div>
<div align="center">
	<!-- include 我的账户左侧账户管理菜单 -->
	<jsp:include page="left.jsp?current=telacct" />
</div>
